var appInstance = getApp()
Page({
  data:{
    scrollImages:null,//首页轮播图
    productImages:null,//产品信息
    apiData:null//api接口列表
  },
  onLoad: function(){
      var that = this;
      that.apiData = appInstance.globalData.apiData;
      var resInfo = appInstance.globalData.scrollImagesJson;
      that.setData({
        scrollImages: resInfo.scrollConf,
        productImages: resInfo.typeConf
      });
      /*启动初始化信息*/
      // wx.request({
      //     url:that.apiData.initUp,
      //     success: function(res){
      //       var resInfo = res.data;
      //       if(resInfo.code!='0000'){

      //           wx.showModal({
      //             title: '提示',
      //             content: '数据获取失败',
      //             showCancel: false
      //           })
      //           return false;
      //       }
      //       that.setData({
      //         scrollImages: resInfo.scrollConf,
      //         productImages: resInfo.typeConf
      //       });
      //     }
      // });
  },
  jumpToPage: function(events){

    var pId = events.currentTarget.dataset.value;
    var jumpUrl = '../product/product?pId='+pId;

    wx.navigateTo({
      url:jumpUrl
    });
  }
})
